package com.iflysse.dao;

import com.iflysse.pojo.po.common.CommonPoResp;
import com.iflysse.pojo.po.req.AddTestQuestToResourcePoReq;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.springframework.stereotype.Repository;

import java.sql.SQLException;

@Repository
public interface ResourceTestDao {
    /**
     * 将题目绑定到资源上
     * @param addTestQuestToResourcePoReq
     * @return
     */
    @Insert({"insert into tb_resource_test (resource_id,question_id) values(UUID(),#{chosenQuestionId})" })
    @Options(useGeneratedKeys = true, keyProperty = "resource_id")
    int addTestQuestionToResource(AddTestQuestToResourcePoReq addTestQuestToResourcePoReq) throws SQLException;
}
